<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<hdjs/>
<script type="text/javascript">
	$(function(){
		$.ajax({
			url : APP + '&c=Details&m=get_commend&aid={$article.aid}',
			dataType:'json',
			beforeSend :function(){
						$('#loading').show();
					},
			success:function(data){
				$('#loading').hide();
				$.each(data, function(index, val) {
					$('#comment-form-box').prepend(" <ul class='position comtext'><li>用户名："+val.nickname+"</li><li>评论内容:"+val.comcon+"</li>");
				});
			},
		})
	})
</script>		

<script type="text/javascript">
	$(function(){
		$("#commentForm").submit( function () {
			var data = $('form[name=comment_form]').serialize();
			$.ajax({
				url:APP+'&c=Details&m=comment&aid={$article.aid}',
				data : data,
	            type : 'post',
	            dataType : 'text',
	            beforeSend :function(){
						$('#loading').show();
					},
				success:function(data){
					// alert(typeof data);
					// $('#loading').hide();
					if(data != NULL){
						// var num=parseInt($('#all_comment').html())+1;
						$('#comment-form-box').prepend(data);
						// $('#all_comment').html(num);
					}else{
						alert('评论内容不能为空!')
					}					
				}
			})
		} );
	})
</script>
<link rel="stylesheet" href="__TEMPLATE_TPL__/css/page.css" />
<include file="__TEMPLATE_TPL__/head"/>
	<!-- 主体区域 -->
	<div id="page_main">
		<!-- 右侧 -->
<include file="__TEMPLATE_TPL__/right"/>
		<!-- 右侧结束 -->
		<!-- 左侧 -->
		<div class="left">
			<h1>{$article.title}</h1>
			<!-- 文章信息 -->
			<div class="article_info_box">
				<p class="article_info">
					<span class="padding_right">{$article.sendtime|date:'m-d',@@}</span>
					分类：<a href="{$article.url}" class="padding_right">{$article.cname}</a>
					<a href="javascript:" class="padding_right comment">
						<span style="color:#0088DB" id="all_comment"><script type="text/javascript" src="{|U:'Index/Details/commend_num',array('aid'=>$article['aid'])}"></script></span>条评论		
					</a>
					<span id="click"><script type="text/javascript" src="{|U:'Index/Details/get_click',array('aid'=>$article['aid'])}"></script></span>次浏览
				</p>
			</div>
			<!-- 文章信息结束 -->

			<!-- 文章内容区域 -->
			<div class="article_content">
				{$article.content}
			</div>
			<!-- 文章内容区域结束 -->

			<p class="position">当前位置：<a href="{$article.url}">{$article.cname}</a> » <a href="">{$article.title}</a></p>
			<p class="tags" style="border-bottom: 1px solid #EEEEEE;padding-bottom:10px;width:780px;">
				<span style="font-size:18px;float:left;">全部评论</span>
				<span id="loading">
					<img src="__TEMPLATE_TPL__/images/loading.gif" style='width:25px;height:25px;'>
				</span>
			</p>
			<div id="comment-form-box" style="width:780px;height:300px;overflow:auto">

				<!-- <ul class="position comtext">
					<li>
						用户名：{$field.user_uid}
					</li>
					<li>
						评论内容:{$field.comcon}
					</li>
				</ul> -->
			</div>
			<p class="tags"><span style="font-size:18px;float:left;">我来评论</span><!-- <span style="font-size:13px;float:right;color:#1A649D"><i style="font-style:normal;color:#1A649D">70</i>条评论</span> --></p>
			<div id="comment-form-box">
				<form id="commentForm" action="javascript:" method="post" name="comment_form">
					<textarea id="comment_content" name="comcon"></textarea>
					<input class='submit' type="submit" value="发表评论">
				</form>
			</div>	
		</div>
	<!-- 主体区域结束 -->
<include file="__TEMPLATE_TPL__/foot"/>